/*
 * @lc app=leetcode.cn id=2520 lang=cpp
 *
 * [2520] 统计能整除数字的位数
 */

// @lc code=start
#include<bits/stdc++.h>
using namespace std;
class Solution {
public:
    int countDigits(int num) {
        int ans = 0;
        int tmp = num;
        while(tmp)
        {
            int t = tmp % 10;
            tmp /= 10;
            {
                int _tmp = num / t;
                if(_tmp * t == num)
                {
                    ans++;
                }
            }
        }
        return ans;
    }
};
// @lc code=end

